package com.edu.dao.impl;

import com.edu.dao.MyBatisUtil;
import com.edu.dao.NewsMapper;
import com.edu.dao.ProductMapper;
import com.edu.data.Product;
import com.edu.entity.Pager;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class MyBatisProductDaoImpl implements ProductMapper {
    SqlSession sqlSession= MyBatisUtil.createSession();
    ProductMapper productMapper = sqlSession.getMapper(ProductMapper.class);

    @Override
    public int deleteByPrimaryKey(Integer epId) {
        return 0;
    }

    @Override
    public int insert(Product record) {
        return 0;
    }

    @Override
    public int insertSelective(Product record) {
        return 0;
    }

    @Override
    public Product selectByPrimaryKey(Integer epId) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(Product record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Product record) {
        return 0;
    }

    @Override
    public List<Product> getAllProduct() {
        List<Product> productList = productMapper.getAllProduct();
        return productList;
    }

    @Override
    public List<Product> getClassProduct(int id) {
        List<Product> productList = productMapper.getClassProduct(id);
        return productList;
    }

    @Override
    public List<Product> selectByPage(Pager pager) {
        return null;
    }

    @Override
    public Product findById(int id) {
        return null;
    }

    @Override
    public void delectproduct(int id) {
        productMapper.delectproduct(id);
    }

    @Override
    public void delect(int id) {

    }

    @Override
    public void add(Product product) {
        productMapper.add(product);
    }

    @Override
    public void update(Product product) {

    }

    @Override
    public List<Product> getProductList(int parseInt) {
        return null;
    }

    @Override
    public List<Product> getProductLists(int parseInt, String name) {
        return null;
    }

}
